// components/music/music.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    song:"",
  },
  attached(){
    this.getSongData()
    console.log(this.data.song)
   
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getSongData() {
     let data =  wx.getStorageSync("song");
      this.setData({
        song:data
      })
    },
    navTo(e){
      console.log(e.target)
      if(e.target.dataset.key){
        wx.navigateTo({
          url: '../../pages/song/song?mid='+e.target.dataset.key,
        });
      } 
    }

  }
})
